﻿$(document).ready(function () {


    var Borrower = [{ "Firstname": "Hilario", "Middlename": "S", "Lastname": "Valmonte", "Address": "Test 1-2-3" },
                    { "Firstname": "MaryGrace", "Middlename": "C", "Lastname": "Aceron", "Address": "Test 4-5-6" },
                    { "Firstname": "Ricky", "Middlename": "S", "Lastname": "Cruz", "Address": "Test 7-8-9" },
                    { "Firstname": "Jezer", "Middlename": "N", "Lastname": "Bautista", "Address": "Test 10-11-12" },
                    { "Firstname": "Lemuel", "Middlename": "Elep", "Lastname": "Aceron", "Address": "Test 13-14-15"}];

    

    $('#BorrowerList li').bind('click', function () {
        var i = ($('#BorrowerList li').index(this)) - 1;


        $('input#txtFirstname').val(Borrower[i].Firstname);
        $('input#txtMiddlename').val(Borrower[i].Middlename);
        $('input#txtLastname').val(Borrower[i].Lastname);
        $('input#txtAddress').val(Borrower[i].Address);

        $('#CustomerDetails table input:text').css('color', '#444444');
    });

    

});